<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>网站信息</title>  
    
    <link rel="stylesheet" href="__PUBLIC__/style/cssn/admin.css">
    <link rel="stylesheet" href="__PUBLIC__/style/cssn/pintuer.css">
    <link rel="stylesheet" href="__PUBLIC__/style/cssn/self.css">
    <script src="__PUBLIC__/style/jsn/jquery.js"></script>
    <script src="__PUBLIC__/style/jsn/pintuer.js"></script>

</head>
<body>
<div class="panel admin-panel">
    <div class="panel-head"><strong><span class="icon-pencil-square-o"></span> 产品信息</strong></div>
    <div class="body-content">
    <form method="post" name="form11" class="form-x" action="{:U('Admin/Notice/insert')}" onSubmit="return Length()">

        <div class="big_div">
            <div class="dates">所属资讯：</div>
            <div class="big_input">
                <select name="team" class="input" style="width:280px; line-height:17px;">
                    <option value="1">公司新闻</option>
                    <option value="2">产业资讯</option>
                </select>
            </div>
            <div class="big_center"></div>
            
        </div>

        <div class="big_div">
            <div class="dates">标题：</div>
            <div class="big_input">
                <input class="input" type="text" style="width:1000px;" name="title" value="" />
            </div>
            <div class="big_center"></div>
            
        </div>

        <div class="big_div">
            <div class="dates">文章内容</div>
            <div class="big_input">
                <!-- 加载编辑器的容器 -->
                <script id="container" name="content" style="width:1000px;height:200px;" type="text/plain">
                  
                </script>
                <!-- 配置文件 -->
                <script type="text/javascript" src="__PUBLIC__/bianji/ueditor.config.js"></script>
                <!-- 编辑器源码文件 -->
                <script type="text/javascript" src="__PUBLIC__/bianji/ueditor.all.js"></script>
                <!-- 实例化编辑器 -->
                <script type="text/javascript">
                    var ue = UE.getEditor('container');
                </script>
            </div>
            <div class="big_center"></div>
            
        </div>

        <div class="big_div">
            <div class="dates">发布时间：</div>
            <div class="big_input">
                <input class="input" type="date" name="time" value="" />
            </div>
            <div class="big_center"></div>
            
        </div>
        <div class="big_div">
            <div class="dates">新闻来源：</div>
            <div class="big_input">
                <input class="input" type="text" name="source" value="" />
            </div>
            <div class="big_center"></div>
            
        </div>
        
        <div class="form-group">
            <div class="label">
              <label></label>
            </div>
            <div class="field">
              <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
            </div>
        </div>

    </form>
  </div>
</div>
</body>

</html>

<script type="text/javascript" src="__PUBLIC__/bootstrap/js/jquery.validation/1.14.0/jquery.validate.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/bootstrap/js/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="__PUBLIC__/bootstrap/js/jquery.validation/1.14.0/messages_zh.min.js"></script>
<link rel="stylesheet" href="__PUBLIC__/bootstrap/js/jquery.validation/1.14.0/validation.css">

<script>
    function Length(){
        var title = document.form11.title.value;
        var ue = UE.getEditor('container');
        var content=ue.getPlainTxt();
        var time = document.form11.time.value;
        var source = document.form11.source.value;

        if(title == "")
        {
            alert('标题不能为空');
            return false;
        }else if(content == 0){
            alert('内容不能为空');
            return false;
        }else if(time == ""){
            alert('请填写时间');
            return false;
        }else if(source == ""){
            alert('新闻来源不能为空');
            return false;
        }
    }
</script>